<!DOCTYPE HTML>
<html>
  <head>
    <title>dragdrop_0.5.html</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
 	<style type="text/css">
 		body {margin:0;padding:0;}	
 	</style>
 	<link href="{$site}/css/admin.css" rel="stylesheet" type="text/css" />
	<script type="text/javascript" src="/js/dragdrop_0.6.js"></script>
	<script type="text/javascript">
		window.onload = function(){
			var container = document.getElementById('container');
			var i = 1;
			for(i;i<=16;i++){
				var docu_id = 'd'+i;
				var ele = document.getElementById(docu_id);
				var bodyWidth = container.offsetWidth,
					bodyHeight = container.offsetHeight;
				var maxX = bodyWidth - ele.offsetWidth - 5;
				var maxY = bodyHeight - ele.offsetHeight - 5;
				var dd = new Dragdrop({
					target : ele,
					area : [0,maxX,0,maxY],
					callback : function(obj){
						if(typeof obj.moveX == 'number' && this.dragX){
							document.getElementById('x').innerHTML = 'x:'+obj.moveX;
						}
						if(typeof obj.moveY == 'number' && this.dragY){
							document.getElementById('y').innerHTML = 'y:'+obj.moveY;	
						}
					}
				});	
			}

			
			//var ele2 = document.getElementById('d2');
			//var maxX2 = bodyWidth - ele2.offsetWidth - 5;
			//var maxY2 = bodyHeight - ele2.offsetHeight - 5;			
			//var dd2 = new Dragdrop({
			//	target : ele2,
			//	area : [0,maxX2,0,maxY2],
			//	callback : function(obj){
			//		if(typeof obj.moveX == 'number' && this.dragX){
			//			document.getElementById('x').innerHTML = 'x:'+obj.moveX;
			//		}
			//		if(typeof obj.moveY == 'number' && this.dragY){
			//			document.getElementById('y').innerHTML = 'y:'+obj.moveY;	
			//		}
			//	}
			//});	
			
			
		}
	</script>
  </head>
  
  <body>

    <div class="listTop">
      <div id="rightTop">
        <p>商品信息</p>
        <ul class="subnav">
          <li><a class="btn1" href="{$site}/index.php/SysItem/lst">管理</a></li>
          <if condition="$_flag_ === 'addzh'">
            <li><span>新增</span></li>
          <elseif condition="$_flag_ === 'edit'"/>
            <li><span>修改</span></li>
          </if>
        </ul>
      </div>
    </div>
    
	
  	<div id="container" style="position:relative;border:5px solid gray;width:865px;height:465px;margin:0 auto;background-image:url(/images/yd.jpg)">
		<div id="d1" name="d1" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d1_hd};">
			[发件人]
		</div>
		
		<div id="d2" name="d2" style="width:250px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d2_hd};">
			[发件人的地址]
		</div>
		
		<div id="d3" name="d3" style="width:250px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d3_hd};">
			[发件人的电话]
		</div>
		
		<div id="d4" name="d4" style="width:80px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d4_hd};">
			[网店名字]
		</div> 	
		
		<div id="d5" name="d5" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d5_hd};">
			[发件省]
		</div> 	
		
		<div id="d6" name="d6" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d6_hd};">
			[发件市]
		</div> 	
		
		<div id="d7" name="d7" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d7_hd};">
			[发件区]
		</div> 	
		
		<div id="d8" name="d8" style="width:80px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d8_hd};">
			[发件邮编]
		</div> 	
		
		
		<div id="d9" name="d9" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d9_hd};">
			[收件人]
		</div>
		
		<div id="d10" name="d10" style="width:250px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d10_hd};">
			[收件人的地址]
		</div>
		
		<div id="d11" name="d11" style="width:250px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d11_hd};">
			[收件人的手机]
		</div>
		
		<div id="d12" name="d12" style="width:250px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d12_hd};">
			[收件人的电话]
		</div> 	
		
		<div id="d13" name="d13" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d13_hd};">
			[收件省]
		</div> 	
		
		<div id="d14" name="d14" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d14_hd};">
			[收件市]
		</div> 	
		
		<div id="d15" name="d15" style="width:70px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d15_hd};">
			[收件区]
		</div> 	
		
		<div id="d16" name="d16" style="width:80px;height:20px;text-align:center;position:absolute;margin:{$exp.zuobiao.d16_hd};">
			[收件邮编]
		</div> 	
		
	</div>

	<div style="width:600px;height:20px;margin:10px auto;">
  		拖拽状态：<span id="x">x:0</span>, <span id="y">y:0</span>
	</div>
	<form action="/index.php/Taobao/exp" method="post" id="form1">
	<input id="d1_hd" type="hidden" name="d1_hd" value="{$exp.zuobiao.d1_hd}" />
	<input id="d2_hd" type="hidden" name="d2_hd" value="{$exp.zuobiao.d2_hd}" />
	<input id="d3_hd" type="hidden" name="d3_hd" value="{$exp.zuobiao.d3_hd}" />
	<input id="d4_hd" type="hidden" name="d4_hd" value="{$exp.zuobiao.d4_hd}" />
	<input id="d5_hd" type="hidden" name="d5_hd" value="{$exp.zuobiao.d5_hd}" />
	<input id="d6_hd" type="hidden" name="d6_hd" value="{$exp.zuobiao.d6_hd}" />
	<input id="d7_hd" type="hidden" name="d7_hd" value="{$exp.zuobiao.d7_hd}" />
	<input id="d8_hd" type="hidden" name="d8_hd" value="{$exp.zuobiao.d8_hd}" />
	
	
	<input id="d9_hd" type="hidden" name="d9_hd" value="{$exp.zuobiao.d9_hd}" />
	<input id="d10_hd" type="hidden" name="d10_hd" value="{$exp.zuobiao.d10_hd}" />
	<input id="d11_hd" type="hidden" name="d11_hd" value="{$exp.zuobiao.d11_hd}" />
	<input id="d12_hd" type="hidden" name="d12_hd" value="{$exp.zuobiao.d12_hd}" />
	<input id="d13_hd" type="hidden" name="d13_hd" value="{$exp.zuobiao.d13_hd}" />
	<input id="d14_hd" type="hidden" name="d14_hd" value="{$exp.zuobiao.d14_hd}" />
	<input id="d15_hd" type="hidden" name="d15_hd" value="{$exp.zuobiao.d15_hd}" />
	<input id="d16_hd" type="hidden" name="d16_hd" value="{$exp.zuobiao.d16_hd}" />
	
	
	<input id="exp_type" type="hidden" name="exp_type" value="{$exp.exp_type}" />
	<input name="Save" type="submit" id="Save" value="保存" />
	
	</form>
  </body>
</html>